package com.arpa.wms.domain.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Digits;
import java.math.BigDecimal;

/**
 * <p>
 * 库位承载类型
 * </p>
 *
 * @author LEO
 * @since 2020-08-03
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="LocationBearType对象", description="库位承载类型")
@TableName("wms_location_bear_type")
public class LocationBearType extends BasicEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "数据标识")
    @TableField("code")
    private String code;

    @ApiModelProperty(value = "所属组织")
    @TableField("group_code")
    private String groupCode;

    @ApiModelProperty(value = "类型名称")
    @TableField("name")
    @Length(max = 100, message = "类型名称长度不能大于100个字符", groups = {Save.class, Update.class})
    private String name;

    @ApiModelProperty(value = "SKU数量")
    @TableField("sku_quantity")
    @Digits(integer = 20,fraction = 0,message = "SKU数量的值超出了允许范围(只允许20位整数)", groups = {Save.class, Update.class})
    private BigDecimal skuQuantity;

    @ApiModelProperty(value = "重量")
    @TableField("weight")
    @Digits(integer = 20,fraction = 2,message = "重量的值超出了允许范围(只允许在18位整数和2位小数范围内)", groups = {Save.class, Update.class})
    private BigDecimal weight;

    @ApiModelProperty(value = "体积")
    @TableField("volume")
    @Digits(integer = 20,fraction = 2,message = "体积的值超出了允许范围(只允许在18位整数和2位小数范围内)", groups = {Save.class, Update.class})
    private BigDecimal volume;

    @ApiModelProperty(value = "托盘数量")
    @TableField("quantity")
    @Digits(integer = 20,fraction = 0,message = "托盘数量的值超出了允许范围(只允许20位整数)", groups = {Save.class, Update.class})
    private BigDecimal quantity;

    @ApiModelProperty(value = "数量")
    @TableField("num")
    @Digits(integer = 20,fraction = 0,message = "数量的值超出了允许范围(只允许20位整数)", groups = {Save.class, Update.class})
    private BigDecimal num;

    @ApiModelProperty(value = "备注")
    @TableField("remarks")
    @Length(max = 100, message = "备注长度不能大于100个字符", groups = {Save.class, Update.class})
    private String remarks;

    @ApiModelProperty(value = "状态")
    @TableField("status")
    private String status;

    @ApiModelProperty(value = "是否可删除操作 0-不可删除 1-可删除")
    @TableField("delete_flag")
    private String deleteFlag;

    public interface Save {

    }

    public interface Update {

    }
}
